package com.gzj.environment.enums.code.impl.commonCode;

import com.gzj.environment.enums.code.BaseCode;
import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tsing
 * @create: 2020-08-09 15:03
 */
@AllArgsConstructor
public enum UploadCode implements BaseCode {

    // 4.5.上传相关(4401~4499)
    INVALID_FILE_TYPE(false, 4401, "非法文件类型"),
    INVALID_FILE_CONTENT(false, 4402, "非法文件内容"),
    FILE_TOO_BIG(false, 4403, "上传大小超过了限制"),
    CONTENT_VALID_FAILURE(false, 4404, "内容校验失败"),
    COMPRESS_FAILURE(false, 4405, "图片压缩失败"),
    ;

    private Boolean success; // 是否成功
    private int code; // 状态码
    private String message; // 操作信息

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
